def print_isosceles_triangle(n):
    for i in range(n):
        for j in range(2 * n - 1):
            print("*" if n - i - 1 <= j <= n + i - 1 else " ", end="")
        print()

# 示例：打印高度为5的等腰三角形
print_isosceles_triangle(5)
